package edu.pku.sei.transformation.editor.actions;

import org.eclipse.jface.action.Action;

import edu.pku.sei.modeler.model.core.MetaModelElement;
import edu.pku.sei.transformation.editor.views.problem.ProblemView;

public class TestProblemViewAction extends Action {
	MetaModelElement element = null;

	public TestProblemViewAction(MetaModelElement element) {
		this.element = element;
		this.setText("test problem view");
	}

	@Override
	public void run() {
		ProblemView.clearMarks(element.getModel());
		ProblemView.showView();
		ProblemView.addError(element.getModel(), ProblemView.CODEGEN, "error1",
				"error1 test", "transformation1.rule1");
		ProblemView.addError(element.getModel(), ProblemView.CODEGEN, "error2",
				"error2 test", "transformation2.rule2");

		ProblemView.addWarning(element.getModel(), ProblemView.CODEGEN,
				"warning1", "warning1 test", "transformation3.rule3");

	}
}
